/* function start() {
	var mob1 = 8220010;
	cm.spawnMobOnMap(mob1,1,1313,94,100000000);//括号内分别对应,怪物ID、怪物数量、X坐标、Y坐标、召唤地图。
	cm.worldMessage(1, "召唤成功");
	cm.dispose();
} */
var acc = "#fEffect/CharacterEff/1112903/0/0#";//红桃心
var aaa = "#fUI/UIWindow.img/Quest/icon9/0#";//红色右箭头
var zzz = "#fUI/UIWindow.img/Quest/icon8/0#";//蓝色右箭头
var sss = "#fUI/UIWindow.img/QuestIcon/3/0#";//选择道具
var 蓝色角点 = "#fUI/UIWindow.img/PvP/Scroll/enabled/next2#";
var 蓝色箭头 = "#fUI/UIWindow/Quest/icon2/7#";
var 红色箭头 = "#fUI/UIWindow/Quest/icon6/7#";
var 圆形 = "#fUI/UIWindow/Quest/icon3/6#";
var 美化ne = "#fUI/UIWindow/Quest/icon6/7#";
var 感叹号 = "#fUI/UIWindow/Quest/icon0#";
var 正方箭头 = "#fUI/Basic/BtHide3/mouseOver/0#";
var 中条猫 ="#fUI/ChatBalloon/37/n#";
var 猫右 =  "#fUI/ChatBalloon/37/ne#";
var 猫左 =  "#fUI/ChatBalloon/37/nw#";
var 右 =    "#fUI/ChatBalloon/37/e#";
var 左 =    "#fUI/ChatBalloon/37/w#";
var 下条猫 ="#fUI/ChatBalloon/37/s#";
var 猫下右 ="#fUI/ChatBalloon/37/se#";
var 猫下左 ="#fUI/ChatBalloon/37/sw#";
var 皇冠白 ="#fUI/GuildMark/Mark/Etc/00009004/16#";
var 蓝色角点 = "#fUI/UIWindow.img/PvP/Scroll/enabled/next2#";
var 草莓 = "#fUI/GuildMark/Mark/Plant/00003000/1#"; // 红色草莓
var 草莓1 = "#fUI/GuildMark/Mark/Plant/00003000/10#"; // 淡蓝色草莓
var 草莓2 = "#fUI/GuildMark/Mark/Plant/00003000/11#"; // 紫色草莓
var 草莓3 = "#fUI/GuildMark/Mark/Plant/00003000/15#"; // 白色草莓
var 草莓4 = "#fUI/GuildMark/Mark/Plant/00003000/3#"; // 黄色草莓
var 草莓5 = "#fUI/GuildMark/Mark/Plant/00003000/8#"; // 绿色草莓
var 小黄星 = "#fItem/Etc/0427/04270001/Icon9/0#";  //
var 彩虹 ="#fEffect/ItemEff/1071085/effect/walk1/2#";
var 大黄星 = "#fItem/Etc/0427/04270001/Icon9/1#";  //
var 小兔 = "#fEffect/CharacterEff/1112960/3/0#";  //邪恶小兔 【小】
var 小水滴 = "#fItem/Etc/0427/04270001/Icon10/5#";  //
var 大水滴 = "#fItem/Etc/0427/04270001/Icon10/4#";  //
var 红爱心 ="#fEffect/CharacterEff/1112905/0/1#";
var 金币图标 = "#fUI/UIWindow.img/QuestIcon/7/0#";
var aaa = "#fUI/UIWindow.img/Quest/icon9/0#";
var zzz = "#fUI/UIWindow.img/Quest/icon8/0#";
var sss = "#fUI/UIWindow.img/QuestIcon/3/0#";
var 随机 = 0//Math.floor(Math.random()*10);
var mob1 =8850007; //BOSS 伊莉娜
var mob2 =9390113; //外星人飞船
var mob3 =8220010;//Dunas
var mob4 =9410224;//皇帝
var mob5 =6160003;//薛西斯 山羊BOSS
var chosenMap = -1;
var monsters = 0;
var towns = 0;
var bosses = 0;
var fuben = 0;
function start() {
    status = -1;
    action(1, 0, 0);
}
function action(mode, type, selection) {
    if (mode == -1) 
	{
       
        cm.dispose();
    } 
	else 
	{
        if (status >= 0 && mode == 0) 
		{
            cm.sendOk("#b好的,下次再见.");
            cm.dispose();
            return;
        }
        if (mode == 1) 
		{
            status++;
        } else 
		{
            status--;
        }
        if (status == 0) 
		{

			if(cm.getPlayer().getMapId()==180000001)
			{
				cm.dispose();
				cm.openNpc(9900005);
				return;
			}
			
			
				var add = "   \t\t"+彩虹+"  #e#d 随机BOSS挑战 #k#n  #r  "+彩虹+"#b#k#n\r\r\n";
				add += "                    #d每天可以挑战#r10次\r\n";
				add += "                #d不同的BOSS会掉落不同的装备\r\n";
				add += "\t\t#L1##d"+小黄星+"冲！就是干！";
				cm.sendSimple(add);
        }
		else if (status == 1) 
		{
			if (selection == 1) 
			{
					cm.dispose();
					if(cm.判断等级() >=250)
					{
						if(随机 == 0)
						{
							var 挑战地图ID = 910110000;
							
							if(cm.判断指定地图怪物数量(挑战地图ID) <=0)
							{
								cm.warp(挑战地图ID,0);
								cm.spawnMobOnMap(mob1,1,-19,184,挑战地图ID);//括号内分别对应,怪物ID、怪物数量、X坐标、Y坐标、召唤地图。
								cm.worldMessage(1, "召唤成功!干它！");
							}
							else
							{
								if(cm.判断指定地图玩家数量(挑战地图ID) <=0)
								{
									cm.warp(挑战地图ID,0);
									cm.清怪();
									cm.清除地图物品(挑战地图ID);
									cm.spawnMobOnMap(mob1,1,-19,184,挑战地图ID);//括号内分别对应,怪物ID、怪物数量、X坐标、Y坐标、召唤地图。
									cm.worldMessage(1, "召唤成功!干它！");
								}
								else
								{
									cm.worldMessage(1, "这个BOSS有人正在打，重新随机一次吧\r\n这一次不会消耗进入次数");
									cm.warp(910000000,0);
								}
							}

						}
						if(随机 == 1)
						{
							var 挑战地图ID = 910110000;
							
							if(cm.判断指定地图怪物数量(挑战地图ID) <=0)
							{
								cm.warp(挑战地图ID,0);
								cm.spawnMobOnMap(mob1,1,-19,184,挑战地图ID);//括号内分别对应,怪物ID、怪物数量、X坐标、Y坐标、召唤地图。
								cm.worldMessage(1, "召唤成功!干它！");
							}
							else
							{
								if(cm.判断指定地图玩家数量(挑战地图ID) <=0)
								{
									cm.warp(挑战地图ID,0);
									cm.清怪();
									cm.清除地图物品(挑战地图ID);
									cm.spawnMobOnMap(mob1,1,-19,184,挑战地图ID);//括号内分别对应,怪物ID、怪物数量、X坐标、Y坐标、召唤地图。
									cm.worldMessage(1, "召唤成功!干它！");
								}
								else
								{
									cm.worldMessage(1, "这个BOSS有人正在打，重新随机一次吧\r\n这一次不会消耗进入次数");
									cm.warp(910000000,0);
								}
							}

						}
					else
					{
						cm.sendOk(""+随机+"");
					}
					}
					else
					{
						cm.worldMessage(1, " 等级不够，无法挑战！250级以上 ");
					}
			}
		}
	}
}